#ifndef SIMPLE_KWS_H
#define SIMPLE_KWS_H

#ifdef __cplusplus
extern "C" {
#endif

// Callback function types for KWS events
typedef void (*kws_keyword_detected_callback)(const char* keyword);
typedef void (*kws_error_callback)(const char* errorMsg);

// Initialize the KWS module
// resource_path: Path to the KWS resource file (e.g., "/demo/resource/many-keywords.txt")
// keyword_count: Number of keywords to recognize
// on_detected: Callback function for keyword detection
// on_error: Callback function for errors
int simple_kws_init(const char* resource_path, int keyword_count,
                    kws_keyword_detected_callback on_detected,
                    kws_error_callback on_error);

// Start KWS listening
int simple_kws_start();

// Stop KWS listening
int simple_kws_stop();

// Clean up KWS resources
void simple_kws_cleanup();

#ifdef __cplusplus
}
#endif

#endif // SIMPLE_KWS_H
